<!DOCTYPE html>
<html CN>







<head>
	
	
	<link rel="stylesheet" href="/css/allinone.min.css"> 

	
	<!-- Global Site Tag (gtag.js) - Google Analytics -->
	<script async src="https://www.googletagmanager.com/gtag/js?id=UA-42863699-1"></script>
	<script>
		window.dataLayer = window.dataLayer || [];
		function gtag(){dataLayer.push(arguments);}
		gtag('js', new Date());
		gtag('config', 'UA-42863699-1');
	</script>
	

	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />

	<title>Category: blog | Cizixs Write Here</title>

	<meta name="HandheldFriendly" content="True" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
	<meta name="generator" content="hexo">
	<meta name="author" content="Cizixs Wu">
	<meta name="description" content="Container, Microservice, Python, Go, Reading, Life, And Love.">

	
	<meta name="keywords" content="hexo, casper, ghost, theme">
	

	
	<link rel="shortcut icon" href="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxfovpzyj30740743yg.jpg">
	

	
	<meta name="theme-color" content="#3c484e">
	<meta name="msapplication-TileColor" content="#3c484e">
	

	

	

	<meta property="og:site_name" content="Cizixs Write Here">
	<meta property="og:type" content="blog">
	<meta property="og:title" content="Category: blog | Cizixs Write Here">
	<meta property="og:description" content="Container, Microservice, Python, Go, Reading, Life, And Love.">
	<meta property="og:url" content="http://cizixs.com/categories/blog/page/2/index.html">

	

	
<link rel="stylesheet" href="/css/prism-base16-ateliersulphurpool.light.css" type="text/css"></head>
<body class="tag-template">
    <div class="site-wrapper">
         




<header class="site-header outer  b-lazy" data-src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxcn9ft3j318w0txdo6.jpg">
    <div class="inner">
        
        
        
<nav class="site-nav"> 
    <div class="site-nav-left">
        <ul class="nav">
            <li>
                
                <a href="/" title="Home">Home</a>
                
            </li>
            
            
            <li>
                <a href="/about" title="About">About</a>
            </li>
            
            <li>
                <a href="/archives" title="Archives">Archives</a>
            </li>
            
            
        </ul> 
    </div>
    <div class="site-nav-right">
        
<div class="social-links" >
    
    <a class="social-link" title="weibo" href="https://weibo.com/1921727853" target="_blank" rel="noopener">
        <svg viewBox="0 0 1141 1024" xmlns="http://www.w3.org/2000/svg"><path d="M916.48 518.144q27.648 21.504 38.912 51.712t9.216 62.976-14.336 65.536-31.744 59.392q-34.816 48.128-78.848 81.92t-91.136 56.32-94.72 35.328-89.6 18.944-75.264 7.68-51.712 1.536-49.152-2.56-68.096-10.24-78.336-21.504-79.872-36.352-74.24-55.296-59.904-78.848q-16.384-29.696-22.016-63.488t-5.632-86.016q0-22.528 7.68-51.2t27.136-63.488 53.248-75.776 86.016-90.112q51.2-48.128 105.984-85.504t117.248-57.856q28.672-10.24 63.488-11.264t57.344 11.264q10.24 11.264 19.456 23.04t12.288 29.184q3.072 14.336 0.512 27.648t-5.632 26.624-5.12 25.6 2.048 22.528q17.408 2.048 33.792-1.536t31.744-9.216 31.232-11.776 33.28-9.216q27.648-5.12 54.784-4.608t49.152 7.68 36.352 22.016 17.408 38.4q2.048 14.336-2.048 26.624t-8.704 23.04-7.168 22.016 1.536 23.552q3.072 7.168 14.848 13.312t27.136 12.288 32.256 13.312 29.184 16.384zM658.432 836.608q26.624-16.384 53.76-45.056t44.032-64 18.944-75.776-20.48-81.408q-19.456-33.792-47.616-57.344t-62.976-37.376-74.24-19.968-80.384-6.144q-78.848 0-139.776 16.384t-105.472 43.008-72.192 60.416-38.912 68.608q-11.264 33.792-6.656 67.072t20.992 62.976 42.496 53.248 57.856 37.888q58.368 25.6 119.296 32.256t116.224 0.512 100.864-21.504 74.24-33.792zM524.288 513.024q20.48 8.192 38.912 18.432t32.768 27.648q10.24 12.288 17.92 30.72t10.752 39.424 1.536 42.496-9.728 38.912q-8.192 18.432-19.968 37.376t-28.672 35.328-40.448 29.184-57.344 18.944q-61.44 11.264-117.76-11.264t-88.064-74.752q-12.288-39.936-13.312-70.656t16.384-66.56q13.312-27.648 40.448-51.712t62.464-38.912 75.264-17.408 78.848 12.8zM361.472 764.928q37.888 3.072 57.856-18.432t21.504-48.128-15.36-47.616-52.736-16.896q-27.648 3.072-43.008 23.552t-17.408 43.52 9.728 42.496 39.424 21.504zM780.288 6.144q74.752 0 139.776 19.968t113.664 57.856 76.288 92.16 27.648 122.88q0 33.792-16.384 50.688t-35.328 17.408-35.328-14.336-16.384-45.568q0-40.96-22.528-77.824t-59.392-64.512-84.48-43.52-96.768-15.872q-31.744 0-47.104-15.36t-14.336-34.304 18.944-34.304 51.712-15.36zM780.288 169.984q95.232 0 144.384 48.64t49.152 146.944q0 30.72-10.24 43.52t-22.528 11.264-22.528-14.848-10.24-35.84q0-60.416-34.816-96.256t-93.184-35.84q-19.456 0-28.672-10.752t-9.216-23.04 9.728-23.04 28.16-10.752z" /></svg>
    </a>
    

    
    <a class="social-link" title="github" href="https://github.com/cizixs" target="_blank" rel="noopener">
        <svg viewBox="0 0 1049 1024" xmlns="http://www.w3.org/2000/svg"><path d="M524.979332 0C234.676191 0 0 234.676191 0 524.979332c0 232.068678 150.366597 428.501342 358.967656 498.035028 26.075132 5.215026 35.636014-11.299224 35.636014-25.205961 0-12.168395-0.869171-53.888607-0.869171-97.347161-146.020741 31.290159-176.441729-62.580318-176.441729-62.580318-23.467619-60.841976-58.234462-76.487055-58.234463-76.487055-47.804409-32.15933 3.476684-32.15933 3.476685-32.15933 53.019436 3.476684 80.83291 53.888607 80.83291 53.888607 46.935238 79.963739 122.553122 57.365291 152.97411 43.458554 4.345855-33.897672 18.252593-57.365291 33.028501-70.402857-116.468925-12.168395-239.022047-57.365291-239.022047-259.012982 0-57.365291 20.860106-104.300529 53.888607-140.805715-5.215026-13.037566-23.467619-66.926173 5.215027-139.067372 0 0 44.327725-13.906737 144.282399 53.888607 41.720212-11.299224 86.917108-17.383422 131.244833-17.383422s89.524621 6.084198 131.244833 17.383422C756.178839 203.386032 800.506564 217.29277 800.506564 217.29277c28.682646 72.1412 10.430053 126.029806 5.215026 139.067372 33.897672 36.505185 53.888607 83.440424 53.888607 140.805715 0 201.64769-122.553122 245.975415-239.891218 259.012982 19.121764 16.514251 35.636014 47.804409 35.636015 97.347161 0 70.402857-0.869171 126.898978-0.869172 144.282399 0 13.906737 9.560882 30.420988 35.636015 25.205961 208.601059-69.533686 358.967656-265.96635 358.967655-498.035028C1049.958663 234.676191 814.413301 0 524.979332 0z" /></svg>
    </a>
    

    
    <a class="social-link" title="stackoverflow" href="https://stackoverflow.com/users/1925083/cizixs" target="_blank" rel="noopener">
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15 21h-10v-2h10v2zm6-11.665l-1.621-9.335-1.993.346 1.62 9.335 1.994-.346zm-5.964 6.937l-9.746-.975-.186 2.016 9.755.879.177-1.92zm.538-2.587l-9.276-2.608-.526 1.954 9.306 2.5.496-1.846zm1.204-2.413l-8.297-4.864-1.029 1.743 8.298 4.865 1.028-1.744zm1.866-1.467l-5.339-7.829-1.672 1.14 5.339 7.829 1.672-1.14zm-2.644 4.195v8h-12v-8h-2v10h16v-10h-2z"/></svg>
    </a>
    

    

    
    <a class="social-link" title="twitter" href="https://twitter.com/cizixs" target="_blank" rel="noopener">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M30.063 7.313c-.813 1.125-1.75 2.125-2.875 2.938v.75c0 1.563-.188 3.125-.688 4.625a15.088 15.088 0 0 1-2.063 4.438c-.875 1.438-2 2.688-3.25 3.813a15.015 15.015 0 0 1-4.625 2.563c-1.813.688-3.75 1-5.75 1-3.25 0-6.188-.875-8.875-2.625.438.063.875.125 1.375.125 2.688 0 5.063-.875 7.188-2.5-1.25 0-2.375-.375-3.375-1.125s-1.688-1.688-2.063-2.875c.438.063.813.125 1.125.125.5 0 1-.063 1.5-.25-1.313-.25-2.438-.938-3.313-1.938a5.673 5.673 0 0 1-1.313-3.688v-.063c.813.438 1.688.688 2.625.688a5.228 5.228 0 0 1-1.875-2c-.5-.875-.688-1.813-.688-2.75 0-1.063.25-2.063.75-2.938 1.438 1.75 3.188 3.188 5.25 4.25s4.313 1.688 6.688 1.813a5.579 5.579 0 0 1 1.5-5.438c1.125-1.125 2.5-1.688 4.125-1.688s3.063.625 4.188 1.813a11.48 11.48 0 0 0 3.688-1.375c-.438 1.375-1.313 2.438-2.563 3.188 1.125-.125 2.188-.438 3.313-.875z"/></svg>

    </a>
    

    
    <a class="social-link" title="instagram" href="https://www.instagram.com/cizixs/" target="_blank" rel="noopener">
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"/></svg>
    </a>
    
    
    
</div>
    </div>
</nav>
        
        <div class="site-header-content">
            
            <h1 class="site-title">
                Category: blog
            </h1>
            <h2 class="site-description">Categories</h2>
        </div>
        
        
    </div>
</header>


<main id="site-main" class="site-main outer" role="main">
	<div class="inner">
		<div class="post-feed">
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="linux lsof 命令使用指南" href="/2017/05/16/linux-lsof-primer/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-05-15T16:00:00.000Z" itemprop="datePublished">
									2017-05-16
								</time>
							</span>
							<h2 class="post-card-title">linux lsof 命令使用指南</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								lsof 简介lsof 是 list open files 的简称，正如名字所示，它的作用主要是列出系统中打开的文件。乍看起来，这是个功能非常简单，使用场景不多的命令，不过是 ls 的另一个版本。但是因为 unix 系统的 everything is a file 的哲学，基本上 *nix 系统所有的对象都可以看做对象，再加上这个命令提供的各种参数，使得它其实非常强大，能够轻松地获得很多非常有用的信息，有些用其他工具会非常麻烦。
lsof 可以知道用户和进程操作了哪些文件，也
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							8
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="使用 sysdig 进行监控和调试 linux 机器" href="/2017/04/27/sysdig-for-linux-system-monitor-and-analysis/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-04-26T16:00:00.000Z" itemprop="datePublished">
									2017-04-27
								</time>
							</span>
							<h2 class="post-card-title">使用 sysdig 进行监控和调试 linux 机器</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								sysdig 简介sysdig 官网 上对自己的介绍是：

Open Source Universal System Visibility With Native Contaier Support.

它的定位是系统监控、分析和排障的工具，其实在 linux 平台上，已经有很多这方面的工具 strace、tcpdump、htop、iftop、lsof、netstat，它们都能用来分析 linux 系统的运行情况，而且还有很多日志、监控工具。为什么还需要 sysdig 呢？在我
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							21
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="使用 curl 命令分析请求的耗时情况" href="/2017/04/11/use-curl-to-analyze-request/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-04-10T16:00:00.000Z" itemprop="datePublished">
									2017-04-11
								</time>
							</span>
							<h2 class="post-card-title">使用 curl 命令分析请求的耗时情况</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								最近工作中遇到一个问题，某个请求的响应特别慢，因此我就希望有一种方法能够分析到底请求的哪一步耗时比较长，好进一步找到问题的原因。在网络上搜索了一下，发现了一个非常好用的方法，curl 命令就能帮你分析请求的各个部分耗时。
curl 命令提供了 -w 参数，这个参数在 manpage 是这样解释的：
 -w, --write-out &lt;format>
              Make curl display information on stdout after a
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							7
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="kubernetes 简介：kube-dns 和服务发现" href="/2017/04/11/kubernetes-intro-kube-dns/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-04-10T16:00:00.000Z" itemprop="datePublished">
									2017-04-11
								</time>
							</span>
							<h2 class="post-card-title">kubernetes 简介：kube-dns 和服务发现</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								服务发现kubernetes 提供了 service 的概念可以通过 VIP 访问 pod 提供的服务，但是在使用的时候还有一个问题：怎么知道某个应用的 VIP？比如我们有两个应用，一个 app，一个 是 db，每个应用使用 rc 进行管理，并通过 service 暴露出端口提供服务。app 需要连接到 db 应用，我们只知道 db 应用的名称，但是并不知道它的 VIP 地址。
最简单的办法是从 kubernetes 提供的 API 查询。但这是一个糟糕的做法，首先每个应用都
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							20
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="kube-proxy 源码解析" href="/2017/04/07/kube-proxy-source-code-analysis/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-04-06T16:00:00.000Z" itemprop="datePublished">
									2017-04-07
								</time>
							</span>
							<h2 class="post-card-title">kube-proxy 源码解析</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								kube-proxy 功能简介我们在之前的文章中介绍过 kube-proxy 和 service的工作原理，以及它们的使用方法和功能。我们再来总结一下，kube-proxy 运行在 kubernetes 集群中每个 worker 节点上，负责实现 service 这个概念提供的功能。kube-proxy 会把访问 service VIP 的请求转发到运行的 pods 上，实现负载均衡。

当用户创建 service 的时候，endpointController 会根据 ser
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							45
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="kubernetes 简介：service 和 kube-proxy 原理" href="/2017/03/30/kubernetes-introduction-service-and-kube-proxy/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-03-29T16:00:00.000Z" itemprop="datePublished">
									2017-03-30
								</time>
							</span>
							<h2 class="post-card-title">kubernetes 简介：service 和 kube-proxy 原理</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								简介在 kubernetes 集群中，网络是非常基础也非常重要的一部分。对于大规模的节点和容器来说，要保证网络的连通性、网络转发的高效，同时能做的 ip 和 port 自动化分配和管理，并让用户用直观简单的方式来访问需要的应用，这是需要复杂且细致设计的。
kubernetes 在这方面下了很大的功夫，它通过 service、dns、ingress 等概念，解决了服务发现、负载均衡的问题，也大大简化了用户的使用和配置。
这篇文章就讲解如何配置 kubernetes 的网络，最终
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							27
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="编写 Dockerfile 的最佳实践" href="/2017/03/28/dockerfile-best-practice/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-03-27T16:00:00.000Z" itemprop="datePublished">
									2017-03-28
								</time>
							</span>
							<h2 class="post-card-title">编写 Dockerfile 的最佳实践</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								简介我之前写过一篇文章介绍 docker 的镜像基本原理和概念，这篇文章是公司内部培训的一个总结文字，主要介绍在编写 docker 镜像的时候一些需要注意的事项和推荐的做法。
虽然 Dockerfile 简化了镜像构建的过程，并且把这个过程可以进行版本控制，但是不正当的 Dockerfile 使用也会导致很多问题：

docker 镜像太大。如果你经常使用镜像或者构建镜像，一定会遇到那种很大的镜像，甚至有些能达到 2G 以上
docker 镜像的构建时间过长。每个 build
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							6
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="kubernetes 简介：controller manager 和自动扩容" href="/2017/03/27/kubernetes-introduction-controller-manager/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-03-26T16:00:00.000Z" itemprop="datePublished">
									2017-03-27
								</time>
							</span>
							<h2 class="post-card-title">kubernetes 简介：controller manager 和自动扩容</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								controller manager 简介在配置了调度器之后，我们的 kubernetes 集群已经能够实现计算资源（容器或者 pod）自动选择合适的节点去运行，看起来很不错，但是 kubernetes 还提供另外一个很重要的特性——保证特定副本的 pod 在运行。为什么呢？
因为在大规模的集群中，总会出现各种各样想不到的错误，某个运行的 pod 会因为各种问题无法运行（代码有 bug、内存泄漏、磁盘满了、权限问题甚至是宿主机故障），而我们希望 kubernetes 能提供一
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							14
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="HTTP 隧道代理原理和实现" href="/2017/03/22/http-tunnel-proxy-and-golang-implementation/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-03-21T16:00:00.000Z" itemprop="datePublished">
									2017-03-22
								</time>
							</span>
							<h2 class="post-card-title">HTTP 隧道代理原理和实现</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								HTTP 隧道代理简介在上一篇文章中我们介绍了 HTTP 普通代理的原理和 golang 简单实现，也提到过普通代理的局限，比如无法代理 HTTPS 的报文，此外普通代理也只能代理 HTTP 协议报文，无法支持其他协议的数据转发。当然有问题就有解决方案，对于这些问题 HTTP 可以通过隧道（tunnel）代理来解决。
隧道代理的原因也可以用一句话来总结：

代理服务器和真正的服务器之间建立起 TCP 连接，然后在客户端和真正服务器端进行数据的直接转发。

《HTTP 权威指南
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							7
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="HTTP 代理原理和实现" href="/2017/03/21/http-proxy-and-golang-implementation/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-03-20T16:00:00.000Z" itemprop="datePublished">
									2017-03-21
								</time>
							</span>
							<h2 class="post-card-title">HTTP 代理原理和实现</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								代理的核心功能可以用一句话概括：接受客户端的请求，转发到后端服务器，获得应答之后返回给客户端。下图是 《HTTP 权威指南》一书中给出的图例，可以很清晰地说明这一流程：

代理的功能有很多，事实上整个互联网到处都充斥着代理服务器。如果所有的 HTTP 访问都是客户端和服务器端直接进行的话，我们的网络不仅会变得缓慢，而且性能会大打折扣。
代理服务器根据不同的配置和使用，可能会有不同的功能，这些功能主要包括：

内容过滤：代理可以根据一定的规则限制某些请求的连接。比如有些公司会设
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							16
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="容器生态系统简介" href="/2017/03/15/container-ecosystem/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-03-14T16:00:00.000Z" itemprop="datePublished">
									2017-03-15
								</time>
							</span>
							<h2 class="post-card-title">容器生态系统简介</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								很少有技术能够像 docker 这样一出来就收到关注，并在很短的时间里发展壮大，而且几乎所有的技术公司都开始使用或者希望使用。随着 docker 的出现，配置管理、微服务、数据中心自动化、devops 多个领域都重新焕发新机，好像 IT 行业的整个架构都要重新定义一样。
这篇文章我会介绍一下目前（2017年 3月）容器圈子（主要还是 docker） 一些主要的参与者，它们共同组成了繁荣的容器生态圈。

容器引擎容器引擎（Engine）或者容器运行时（Runtime）是容器系统
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							9
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="kubernetes 简介：调度器和调度算法" href="/2017/03/10/kubernetes-intro-scheduler/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-03-09T16:00:00.000Z" itemprop="datePublished">
									2017-03-10
								</time>
							</span>
							<h2 class="post-card-title">kubernetes 简介：调度器和调度算法</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								简介scheduler 是 kubernetes 的调度器，主要的任务是把定义的 pod 分配到集群的节点上。听起来非常简单，但有很多要考虑的问题：

公平：如何保证每个节点都能被分配资源
资源高效利用：集群所有资源最大化被使用
效率：调度的性能要好，能够尽快地对大批量的 pod 完成调度工作
灵活：允许用户根据自己的需求控制调度的逻辑

sheduler 是作为单独的程序运行的，启动之后会一直坚挺 API Server，获取 PodSpec.NodeName 为空的 pod
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							11
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="virtualbox 常用网络模式解释和配置" href="/2017/03/09/virtualbox-network-mode-explained/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-03-08T16:00:00.000Z" itemprop="datePublished">
									2017-03-09
								</time>
							</span>
							<h2 class="post-card-title">virtualbox 常用网络模式解释和配置</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								介绍默认情况下，virtualbox 创建的虚拟机网络为 NAT 模式，这样虚拟机就可以通过主机的网络连接到外部网络。如果需要直接访问虚拟机网络，可以通过端口转发机制。
但是除了默认的网络配置，virtualbox 还提供了其他网络选项来实现用户各种各样的需求。创建网络的时候，有两类配置要做：

网卡的硬件类型
网卡的网络模式

virtualbox 每台虚拟机支持多块虚拟网卡，每块网络都可以配置不同的网络模式。
网卡类型virtualbox 支持多种虚拟网卡类型，选择对应的
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							10
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="flask 源码解析：session" href="/2017/03/08/flask-insight-session/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-03-07T16:00:00.000Z" itemprop="datePublished">
									2017-03-08
								</time>
							</span>
							<h2 class="post-card-title">flask 源码解析：session</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								这是 flask 源码解析系列文章的其中一篇，本系列所有文章列表：

flask 源码解析：简介
flask 源码解析：应用启动流程
flask 源码解析：路由
flask 源码解析：上下文
flask 源码解析：请求
flask 源码解析：响应
flask 源码解析：session

session 简介在解析 session 的实现之前，我们先介绍一下 session 怎么使用。session 可以看做是在不同的请求之间保存数据的方法，因为 HTTP 是无状态的协议，但是
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							24
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="linux 网络虚拟化： ipvlan" href="/2017/02/17/network-virtualization-ipvlan/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-02-16T16:00:00.000Z" itemprop="datePublished">
									2017-02-17
								</time>
							</span>
							<h2 class="post-card-title">linux 网络虚拟化： ipvlan</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								简介IPVlan 和 macvlan 类似，都是从一个主机接口虚拟出多个虚拟网络接口。一个重要的区别就是所有的虚拟接口都有相同的 macv 地址，而拥有不同的 ip 地址。因为所有的虚拟接口要共享 mac 地址，所有有些需要注意的地方：

DHCP 协议分配 ip 的时候一般会用 mac 地址作为机器的标识。这个情况下，客户端动态获取 ip 的时候需要配置唯一的 ClientID 字段，并且 DHCP server 也要正确配置使用该字段作为机器标识，而不是使用 mac 地址
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							9
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="linux 网络虚拟化： macvlan" href="/2017/02/14/network-virtualization-macvlan/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-02-13T16:00:00.000Z" itemprop="datePublished">
									2017-02-14
								</time>
							</span>
							<h2 class="post-card-title">linux 网络虚拟化： macvlan</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								macvlan 简介macvlan 是 linux kernel 比较新的特性，可以通过以下方法判断当前系统是否支持：
$ modprobe macvlan
$ lsmod | grep macvlan
  macvlan    19046    0

如果第一个命令报错，或者第二个命令没有返回，则说明当前系统不支持 macvlan，需要升级系统或者升级内核。
macvlan 允许你在主机的一个网络接口上配置多个虚拟的网络接口，这些网络 interface 有自己独立的 ma
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							16
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="linux 网络虚拟化： network namespace 简介" href="/2017/02/10/network-virtualization-network-namespace/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-02-09T16:00:00.000Z" itemprop="datePublished">
									2017-02-10
								</time>
							</span>
							<h2 class="post-card-title">linux 网络虚拟化： network namespace 简介</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								network namespace 是实现网络虚拟化的重要功能，它能创建多个隔离的网络空间，它们有独自的网络栈信息。不管是虚拟机还是容器，运行的时候仿佛自己就在独立的网络中。这篇文章介绍 network namespace 的基本概念和用法，network namespace 是 linux 内核提供的功能，这篇文章借助 ip 命令来完成各种操作。ip 命令来自于 iproute2 安装包，一般系统会默认安装，如果没有的话，请读者自行安装。
NOTE：ip 命令因为需要修改系
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							17
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="flask 源码解析：响应" href="/2017/01/22/flask-insight-response/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-01-21T16:00:00.000Z" itemprop="datePublished">
									2017-01-22
								</time>
							</span>
							<h2 class="post-card-title">flask 源码解析：响应</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								这是 flask 源码解析系列文章的其中一篇，本系列所有文章列表：

flask 源码解析：简介
flask 源码解析：应用启动流程
flask 源码解析：路由
flask 源码解析：上下文
flask 源码解析：请求
flask 源码解析：响应
flask 源码解析：session

response 简介在 flask 应用中，我们只需要编写 view 函数，并不需要直接和响应（response）打交道，flask 会自动生成响应返回给客户端。

The return v
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							23
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="flask 源码解析：请求" href="/2017/01/18/flask-insight-request/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-01-17T16:00:00.000Z" itemprop="datePublished">
									2017-01-18
								</time>
							</span>
							<h2 class="post-card-title">flask 源码解析：请求</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								这是 flask 源码解析系列文章的其中一篇，本系列所有文章列表：

flask 源码解析：简介
flask 源码解析：应用启动流程
flask 源码解析：路由
flask 源码解析：上下文
flask 源码解析：请求
flask 源码解析：响应
flask 源码解析：session

简介对于物理链路来说，请求只是不同电压信号，它根本不知道也不需要知道请求格式和内容到底是怎样的；对于 TCP 层来说，请求就是传输的数据（二进制的数据流），它只要发送给对应的应用程序就行了；对
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							20
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="flask 源码解析：上下文" href="/2017/01/13/flask-insight-context/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-01-12T16:00:00.000Z" itemprop="datePublished">
									2017-01-13
								</time>
							</span>
							<h2 class="post-card-title">flask 源码解析：上下文</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								这是 flask 源码解析系列文章的其中一篇，本系列所有文章列表：

flask 源码解析：简介
flask 源码解析：应用启动流程
flask 源码解析：路由
flask 源码解析：上下文
flask 源码解析：请求
flask 源码解析：响应
flask 源码解析：session

上下文（application context 和 request context）上下文一直是计算机中难理解的概念，在知乎的一个问题下面有个很通俗易懂的回答：

每一段程序都有很多外部变量。
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							35
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="flask 源码解析：路由" href="/2017/01/12/flask-insight-routing/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-01-11T16:00:00.000Z" itemprop="datePublished">
									2017-01-12
								</time>
							</span>
							<h2 class="post-card-title">flask 源码解析：路由</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								这是 flask 源码解析系列文章的其中一篇，本系列所有文章列表：

flask 源码解析：简介
flask 源码解析：应用启动流程
flask 源码解析：路由
flask 源码解析：上下文
flask 源码解析：请求
flask 源码解析：响应
flask 源码解析：session

构建路由规则一个 web 应用不同的路径会有不同的处理函数，路由就是根据请求的 URL 找到对应处理函数的过程。
在执行查找之前，需要有一个规则列表，它存储了 url 和处理函数的对应关系。最
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							18
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="flask 源码解析：应用启动流程" href="/2017/01/11/flask-insight-start-process/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-01-10T16:00:00.000Z" itemprop="datePublished">
									2017-01-11
								</time>
							</span>
							<h2 class="post-card-title">flask 源码解析：应用启动流程</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								这是 flask 源码解析系列文章的其中一篇，本系列所有文章列表：

flask 源码解析：简介
flask 源码解析：应用启动流程
flask 源码解析：路由
flask 源码解析：上下文
flask 源码解析：请求
flask 源码解析：响应
flask 源码解析：session

WSGI所有的 python web 框架都要遵循 WSGI 协议，如果对 WSGI 不清楚，可以查看我之前的介绍文章。
在这里还是要简单回顾一下 WSGI 的核心概念。
WSGI 中有一个非
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							12
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="flask 源码解析：简介" href="/2017/01/10/flask-insight-introduction/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-01-09T16:00:00.000Z" itemprop="datePublished">
									2017-01-10
								</time>
							</span>
							<h2 class="post-card-title">flask 源码解析：简介</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								这是 flask 源码解析系列文章的其中一篇，本系列所有文章列表：

flask 源码解析：简介
flask 源码解析：应用启动流程
flask 源码解析：路由
flask 源码解析：上下文
flask 源码解析：请求
flask 源码解析：响应
flask 源码解析：session

flask 简介Flask 官网上对它的定位是一个“微” python web 开发框架。

Flask is a micro web development framework for Py
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							9
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="pxe 自动安装系统流程分析" href="/2017/01/09/pxe-boot-process/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-01-08T16:00:00.000Z" itemprop="datePublished">
									2017-01-09
								</time>
							</span>
							<h2 class="post-card-title">pxe 自动安装系统流程分析</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								TL;DR
本文介绍 pxe 安装 linux 系统过程中，每个阶段用到网络协议的作用和它们的数据格式。不会介绍 pxe 安装系统的原理和配置，而是假设读者已经了解这方面的信息（如果不了解的话，可以查看这篇文章： CentOS 6.4 PXE+Kickstart unattended installation operating system，或者网络上其他的教程）。
简介

机器从网络启动，触发 pxe 相关的固件模块发送 DHCP 请求，请求以广播方式向整个网段传播
DH
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							10
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="让 CPU 告诉你硬盘和网络到底有多慢" href="/2017/01/03/how-slow-is-disk-and-network/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2017-01-02T16:00:00.000Z" itemprop="datePublished">
									2017-01-03
								</time>
							</span>
							<h2 class="post-card-title">让 CPU 告诉你硬盘和网络到底有多慢</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								简介经常听到有人说磁盘很慢、网络很卡，这都是站在人类的感知维度去表述的，比如拷贝一个文件到硬盘需要几分钟到几十分钟，够我去吃个饭啦；而从网络下载一部电影，有时候需要几个小时，我都可以睡一觉了。
最为我们熟知的关于计算机不同组件速度差异的图表，是下面这种金字塔形式：越往上速度越快，容量越小，而价格越高。这张图只是给了我们一个直观地感觉，并没有对各个速度和性能做出量化的说明和解释。而实际上，不同层级之间的差异要比这张图大的多。这篇文章就让你站在 CPU 的角度看这个世界，说说到底
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							7
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="Go 语言 JSON 简介" href="/2016/12/19/golang-json-guide/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2016-12-18T16:00:00.000Z" itemprop="datePublished">
									2016-12-19
								</time>
							</span>
							<h2 class="post-card-title">Go 语言 JSON 简介</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								简介JSON（JavaScript Object Notation） 是一种轻量级的数据交换格式，因为易读性、机器容易处理而变得流行。
JSON 语言定义的内容非常简洁，主要分为三种类型：对象（object）、数组（array）和基本类型（value）。基本类型（value）包括：

string 字符串，双引号括起来的 unciode 字符序列
number 数字，可以是整数，也可以是浮点数，但是不支持八进制和十六进制表示的数字
true，false 真值和假值，一般对应语
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							16
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="跟着 Github 学习 Restful HTTP API 设计" href="/2016/12/12/restful-api-design-guide/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2016-12-11T16:00:00.000Z" itemprop="datePublished">
									2016-12-12
								</time>
							</span>
							<h2 class="post-card-title">跟着 Github 学习 Restful HTTP API 设计</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								近几年提供 HTTP API 服务的公司越来越多，许多公司都把 API 作为产品重要的一部分，作为服务提供出去。而微服务的兴起，也让企业内部开始重视和频繁使用 HTTP API 。好的 HTTP API 设计容易理解、符合 RFC 标准、提供使用者便利的功能，其中经常被拿来作为教科书典范的当属 Github API。这篇文章就通过 Github API 总结了一些非常好的设计原则，可以作为以后要编写 HTTP API 的参考。
注意：这篇文章只讨论设计原则，不是强制要求（AP
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							16
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="使用 coreos 运行 docker 的 netns 问题" href="/2016/11/22/coreos-docker-netns-issue/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2016-11-21T16:00:00.000Z" itemprop="datePublished">
									2016-11-22
								</time>
							</span>
							<h2 class="post-card-title">使用 coreos 运行 docker 的 netns 问题</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								背景知识docker 把所有的 network namespace 放在 /var/run/docker/netns 目录下面，要进入到 network namespace 有两种方法：

使用 nsenter：nsenter --net=/var/run/docker/netns/&lt;uuid&gt; ip addr ，可以使用 nsenter --net=/var/run/docker/netns/&lt;uuid&gt; sh 进入到该 ns 的 shell 中，后
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							7
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="kubernetes 简介：API Server 和 node" href="/2016/11/07/kubernetes-intro-api-server/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2016-11-06T16:00:00.000Z" itemprop="datePublished">
									2016-11-07
								</time>
							</span>
							<h2 class="post-card-title">kubernetes 简介：API Server 和 node</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								简介这篇文章是整个系统的第二篇，上一篇文章讲解了 kubelet 的功能和使用。
在 kubernetes 集群中，API Server 有着非常重要的角色。API Server 负责和 etcd 交互（其他组件不会直接操作 etcd，只有 API Server 这么做），是整个 kubernetes 集群的数据中心，所有的交互都是以 API Server 为核心的。简单来说，API Server 提供了一下的功能：

整个集群管理的 API 接口：所有对集群进行的查询和管理
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							52
							 min read
						</span>
					</footer>
				</div>
			</article>
			
			<article class="post-card post  no-image ">
				
				<div class="post-card-content">
					<a class="post-card-content-link" title="kubernetes 简介： kubelet 和 pod" href="/2016/10/25/kubernetes-intro-kubelet/">
						<header class="post-card-header">
							<span class="post-card-tags">
								
								
								blog
								| 
								
								<time datetime="2016-10-24T16:00:00.000Z" itemprop="datePublished">
									2016-10-25
								</time>
							</span>
							<h2 class="post-card-title">kubernetes 简介： kubelet 和 pod</h2>
						</header>
						<section class="post-card-excerpt">
							<p>
								
								
								
								
								
								简介kubernetes 是一个分布式的集群管理系统，在每个节点（node）上都要运行一个 worker 对容器进行生命周期的管理，这个 worker 程序就是 kubelet。
简单地说，kubelet 的主要功能就是定时从某个地方获取节点上 pod/container 的期望状态（运行什么容器、运行的副本数量、网络或者存储如何配置等等），并调用对应的容器平台接口达到这个状态。
集群状态下，kubelet 会从 master 上读取信息，但其实 kubelet 还可以从其他
								...
							</p>
						</section>
					</a>
					<footer class="post-card-meta">
						<ul class="author-list">
							<li class="author-list-item">
								<div class="author-name-tooltip">Cizixs Wu</div>
								
								<a href="/about" class="static-avatar">
									<img class="author-profile-image" src="https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxhqq5mvj30u00xqgp3.jpg" alt="Cizixs Wu" />
								</a>
								
							</li>
						</ul>
						<span class="reading-time">
							41
							 min read
						</span>
					</footer>
				</div>
			</article>
			
		</div>
	</div>
	
<nav class="pagination">
    
    
        <nav class="page-nav">
            <a class="extend prev" rel="prev" href="/categories/blog/">← Prev</a><a class="page-number" href="/categories/blog/">1</a><span class="page-number current">2</span><a class="page-number" href="/categories/blog/page/3/">3</a><a class="extend next" rel="next" href="/categories/blog/page/3/">Next →</a>
        </nav>
    
    
</nav>
</main>


        

<aside class="read-next outer">
    <div class="inner">
        <div class="read-next-feed">
            
            

<article class="read-next-card"  style="background-image: url(https://cizixs-blog.oss-cn-beijing.aliyuncs.com/006tNc79ly1g1qxcn9ft3j318w0txdo6.jpg)"  >
  <header class="read-next-card-header">
    <small class="read-next-card-header-sitetitle">&mdash; Cizixs Write Here &mdash;</small>
    <h3 class="read-next-card-header-title">Recent Posts</h3>
  </header>
  <div class="read-next-divider">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
      <path d="M13 14.5s2 3 5 3 5.5-2.463 5.5-5.5S21 6.5 18 6.5c-5 0-7 11-12 11C2.962 17.5.5 15.037.5 12S3 6.5 6 6.5s4.5 3.5 4.5 3.5"/>
    </svg>
  </div>
  <div class="read-next-card-content">
    <ul>
      
      
      
      <li>
        <a href="/2018/08/26/what-is-istio/">什么是 istio</a>
      </li>
      
      
      
      <li>
        <a href="/2018/08/25/knative-serverless-platform/">serverless 平台 knative 简介</a>
      </li>
      
      
      
      <li>
        <a href="/2018/06/25/kubernetes-resource-management/">kubernetes 资源管理概述</a>
      </li>
      
      
      
      <li>
        <a href="/2018/01/24/use-prometheus-and-grafana-to-monitor-linux-machine/">使用 promethues 和 grafana 监控自己的 linux 机器</a>
      </li>
      
      
      
      <li>
        <a href="/2018/01/13/linux-udp-packet-drop-debug/">linux 系统 UDP 丢包问题分析思路</a>
      </li>
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
    </ul>
  </div>
  <footer class="read-next-card-footer">
    <a href="/archives">  MORE  → </a>
  </footer>
</article>


            
            
            
        </div>
    </div>
</aside>


<footer class="site-footer outer">

	<div class="site-footer-content inner">
		<section class="copyright">
			<a href="/" title="Cizixs Write Here">Cizixs Write Here</a>
			&copy; 2019
		</section>
		<nav class="site-footer-nav">
			
            <a href="https://hexo.io" title="Hexo" target="_blank" rel="noopener">Hexo</a>
            <a href="https://github.com/xzhih/hexo-theme-casper" title="Casper" target="_blank" rel="noopener">Casper</a>
        </nav>
    </div>
</footer>




<script>
    /*!
  hey, [be]Lazy.js - v1.8.2 - 2016.10.25
  A fast, small and dependency free lazy load script (https://github.com/dinbror/blazy)
  (c) Bjoern Klinggaard - @bklinggaard - http://dinbror.dk/blazy
*/
  (function(q,m){"function"===typeof define&&define.amd?define(m):"object"===typeof exports?module.exports=m():q.Blazy=m()})(this,function(){function q(b){var c=b._util;c.elements=E(b.options);c.count=c.elements.length;c.destroyed&&(c.destroyed=!1,b.options.container&&l(b.options.container,function(a){n(a,"scroll",c.validateT)}),n(window,"resize",c.saveViewportOffsetT),n(window,"resize",c.validateT),n(window,"scroll",c.validateT));m(b)}function m(b){for(var c=b._util,a=0;a<c.count;a++){var d=c.elements[a],e;a:{var g=d;e=b.options;var p=g.getBoundingClientRect();if(e.container&&y&&(g=g.closest(e.containerClass))){g=g.getBoundingClientRect();e=r(g,f)?r(p,{top:g.top-e.offset,right:g.right+e.offset,bottom:g.bottom+e.offset,left:g.left-e.offset}):!1;break a}e=r(p,f)}if(e||t(d,b.options.successClass))b.load(d),c.elements.splice(a,1),c.count--,a--}0===c.count&&b.destroy()}function r(b,c){return b.right>=c.left&&b.bottom>=c.top&&b.left<=c.right&&b.top<=c.bottom}function z(b,c,a){if(!t(b,a.successClass)&&(c||a.loadInvisible||0<b.offsetWidth&&0<b.offsetHeight))if(c=b.getAttribute(u)||b.getAttribute(a.src)){c=c.split(a.separator);var d=c[A&&1<c.length?1:0],e=b.getAttribute(a.srcset),g="img"===b.nodeName.toLowerCase(),p=(c=b.parentNode)&&"picture"===c.nodeName.toLowerCase();if(g||void 0===b.src){var h=new Image,w=function(){a.error&&a.error(b,"invalid");v(b,a.errorClass);k(h,"error",w);k(h,"load",f)},f=function(){g?p||B(b,d,e):b.style.backgroundImage='url("'+d+'")';x(b,a);k(h,"load",f);k(h,"error",w)};p&&(h=b,l(c.getElementsByTagName("source"),function(b){var c=a.srcset,e=b.getAttribute(c);e&&(b.setAttribute("srcset",e),b.removeAttribute(c))}));n(h,"error",w);n(h,"load",f);B(h,d,e)}else b.src=d,x(b,a)}else"video"===b.nodeName.toLowerCase()?(l(b.getElementsByTagName("source"),function(b){var c=a.src,e=b.getAttribute(c);e&&(b.setAttribute("src",e),b.removeAttribute(c))}),b.load(),x(b,a)):(a.error&&a.error(b,"missing"),v(b,a.errorClass))}function x(b,c){v(b,c.successClass);c.success&&c.success(b);b.removeAttribute(c.src);b.removeAttribute(c.srcset);l(c.breakpoints,function(a){b.removeAttribute(a.src)})}function B(b,c,a){a&&b.setAttribute("srcset",a);b.src=c}function t(b,c){return-1!==(" "+b.className+" ").indexOf(" "+c+" ")}function v(b,c){t(b,c)||(b.className+=" "+c)}function E(b){var c=[];b=b.root.querySelectorAll(b.selector);for(var a=b.length;a--;c.unshift(b[a]));return c}function C(b){f.bottom=(window.innerHeight||document.documentElement.clientHeight)+b;f.right=(window.innerWidth||document.documentElement.clientWidth)+b}function n(b,c,a){b.attachEvent?b.attachEvent&&b.attachEvent("on"+c,a):b.addEventListener(c,a,{capture:!1,passive:!0})}function k(b,c,a){b.detachEvent?b.detachEvent&&b.detachEvent("on"+c,a):b.removeEventListener(c,a,{capture:!1,passive:!0})}function l(b,c){if(b&&c)for(var a=b.length,d=0;d<a&&!1!==c(b[d],d);d++);}function D(b,c,a){var d=0;return function(){var e=+new Date;e-d<c||(d=e,b.apply(a,arguments))}}var u,f,A,y;return function(b){if(!document.querySelectorAll){var c=document.createStyleSheet();document.querySelectorAll=function(a,b,d,h,f){f=document.all;b=[];a=a.replace(/\[for\b/gi,"[htmlFor").split(",");for(d=a.length;d--;){c.addRule(a[d],"k:v");for(h=f.length;h--;)f[h].currentStyle.k&&b.push(f[h]);c.removeRule(0)}return b}}var a=this,d=a._util={};d.elements=[];d.destroyed=!0;a.options=b||{};a.options.error=a.options.error||!1;a.options.offset=a.options.offset||100;a.options.root=a.options.root||document;a.options.success=a.options.success||!1;a.options.selector=a.options.selector||".b-lazy";a.options.separator=a.options.separator||"|";a.options.containerClass=a.options.container;a.options.container=a.options.containerClass?document.querySelectorAll(a.options.containerClass):!1;a.options.errorClass=a.options.errorClass||"b-error";a.options.breakpoints=a.options.breakpoints||!1;a.options.loadInvisible=a.options.loadInvisible||!1;a.options.successClass=a.options.successClass||"b-loaded";a.options.validateDelay=a.options.validateDelay||25;a.options.saveViewportOffsetDelay=a.options.saveViewportOffsetDelay||50;a.options.srcset=a.options.srcset||"data-srcset";a.options.src=u=a.options.src||"data-src";y=Element.prototype.closest;A=1<window.devicePixelRatio;f={};f.top=0-a.options.offset;f.left=0-a.options.offset;a.revalidate=function(){q(a)};a.load=function(a,b){var c=this.options;void 0===a.length?z(a,b,c):l(a,function(a){z(a,b,c)})};a.destroy=function(){var a=this._util;this.options.container&&l(this.options.container,function(b){k(b,"scroll",a.validateT)});k(window,"scroll",a.validateT);k(window,"resize",a.validateT);k(window,"resize",a.saveViewportOffsetT);a.count=0;a.elements.length=0;a.destroyed=!0};d.validateT=D(function(){m(a)},a.options.validateDelay,a);d.saveViewportOffsetT=D(function(){C(a.options.offset)},a.options.saveViewportOffsetDelay,a);C(a.options.offset);l(a.options.breakpoints,function(a){if(a.width>=window.screen.width)return u=a.src,!1});setTimeout(function(){q(a)})}});
    ;(function() {var bLazy = new Blazy();})();
</script>



    </div>
</body>
</html>
